package com.pcjavanet.collect.mes.to;

import java.io.Serializable;
import java.util.Date;

public class DiscreteData implements Serializable {

	/**	serialVersionUID */
	private static final long serialVersionUID = 1L;
	
	/**  dataKey .*/
	private int dataKey=0;
	private int historyBtDateKey;
	private int monitorId=1;
	private double inspected=1.0;
	private double defective=0.0;
	private double defects=0.0;
	private double dpmo = 0.0 ;
	private double defectOpportunity = 0.0;
	private double passedUnit = 0.0;
	private long 	aDataTime = 0;
	
	private String lastGroupDate="1970-01-01 00:00:00";
	private String chartType="C";
	private String sendEmailDate="1970-01-01 00:00:00";
	private String ocap="";
	private int groupStatus;
	//send email times e.g 0,1,2,3,4,5
	
	private String monitorName;
	private String location;
	private String period;
	private double ucl;
	
	private double lcl;
	
	private int sendEmailTimes;
	private Date createDate;
	private String createDateStr;
	private String aDataTimeStr;
	private int dataStatus;
	private String inputUser;
	private boolean isException = false;
	public static String ABNORMAL_POINT_AND_NO_OCAP = "ABNORMAL_POINT_AND_NO_OCAP";
	private String yield;
	private String yieldLimit;
	private int dataUser=0;
	private String rulesExceptionHtml = "<table style='font-size:9pt' >";
	
	/* AddForExtChart */
	private int seq ;
	private double yAxesValue;
	private boolean hideRow ;
	private double extucl;
	private double extlcl;
	
	private long createTime ; 
	
	private long a_DateTime;
	private String timeRange;
	public long getA_DateTime() {
		return a_DateTime;
	}

	public void setA_DateTime(long a_DateTime) {
		this.a_DateTime = a_DateTime;
	}

	public String getTimeRange() {
		return timeRange;
	}

	public void setTimeRange(String timeRange) {
		this.timeRange = timeRange;
	}
	
	private String createTimeStr ; 
	public String getCreateTimeStr() {
		return createTimeStr;
	}

	public void setCreateTimeStr(String createTimeStr) {
		this.createTimeStr = createTimeStr;
	}

	public long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(long createTime) {
		this.createTime = createTime;
	}

	public double getExtucl() {
		return extucl;
	}

	public void setExtucl(double extucl) {
		this.extucl = extucl;
	}

	public double getExtlcl() {
		return extlcl;
	}

	public long getaDataTime() {
		return aDataTime;
	}

	public String getaDataTimeStr() {
		return aDataTimeStr;
	}

	public void setaDataTimeStr(String aDataTimeStr) {
		this.aDataTimeStr = aDataTimeStr;
	}

	public void setaDataTime(long aDataTime) {
		this.aDataTime = aDataTime;
	}

	public void setExtlcl(double extlcl) {
		this.extlcl = extlcl;
	}

	public boolean isHideRow() {
		return hideRow;
	}

	public void setHideRow(boolean hideRow) {
		this.hideRow = hideRow;
	}
	public int getSeq() {
		return seq;
	}

	public void setSeq(int seq) {
		this.seq = seq;
	}

	public double getyAxesValue() {
		return yAxesValue;
	}

	public void setyAxesValue(double yAxesValue) {
		this.yAxesValue = yAxesValue;
	}

	
	public int getDataKey() {
		return dataKey;
	}

	public void setDataKey(int dataKey) {
		this.dataKey = dataKey;
	}
	
	public int getGroupStatus() {
		return groupStatus;
	}
	public void setGroupStatus(int groupStatus) {
		this.groupStatus = groupStatus;
	}
	public String getChartType() {
		return chartType;
	}
	public void setChartType(String chartType) {
		this.chartType = chartType;
	}
	public double getDefective() {
		return defective;
	}
	public void setDefective(double defective) {
		this.defective = defective;
	}
	public double getDefects() {
		return defects;
	}
	public void setDefects(double defects) {
		this.defects = defects;
	}
	public double getInspected() {
		return inspected;
	}
	public void setInspected(double inspected) {
		this.inspected = inspected;
	}

	public double getDpmo() {
		return dpmo;
	}

	public void setDpmo(double dpmo) {
		this.dpmo = dpmo;
	}

	public double getDefectOpportunity() {
		return defectOpportunity;
	}

	public void setDefectOpportunity(double defectOpportunity) {
		this.defectOpportunity = defectOpportunity;
	}

	public String getOcap() {
		return ocap;
	}

	public void setOcap(String ocap) {
		this.ocap = ocap;
	}

	public int getMonitorId() {
		return monitorId;
	}
	public void setMonitorId(int monitorId) {
		this.monitorId = monitorId;
	}
	public String getLastGroupDate() {
		return lastGroupDate;
	}
	public void setLastGroupDate(String statDate) {
		this.lastGroupDate = statDate;
	}
	public String getSendEmailDate() {
		return sendEmailDate;
	}
	public void setSendEmailDate(String sendEmailDate) {
		this.sendEmailDate = sendEmailDate;
	}
	public int getHistoryBtDateKey() {
		return historyBtDateKey;
	}
	public void setHistoryBtDateKey(int historyBtDateKey) {
		this.historyBtDateKey = historyBtDateKey;
	}
	public int getSendEmailTimes() {
		return sendEmailTimes;
	}
	public void setSendEmailTimes(int sendEmailTimes) {
		this.sendEmailTimes = sendEmailTimes;
	}
	
	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public int getDataStatus() {
		return dataStatus;
	}

	public void setDataStatus(int dataStatus) {
		this.dataStatus = dataStatus;
	}
	public boolean isException() {
		return isException;
	}

	public void setException(boolean isException) {
		this.isException = isException;
	}

	public String getInputUser() {
		return inputUser;
	}

	public void setInputUser(String inputUser) {
		this.inputUser = inputUser;
	}

	public String getMonitorName() {
		return monitorName;
	}

	public void setMonitorName(String monitorName) {
		this.monitorName = monitorName;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getPeriod() {
		return period;
	}

	public void setPeriod(String period) {
		this.period = period;
	}

	public double getUcl() {
		return ucl;
	}

	public void setUcl(double ucl) {
		this.ucl = ucl;
	}

	public double getLcl() {
		return lcl;
	}

	public void setLcl(double lcl) {
		this.lcl = lcl;
	}

	public String getCreateDateStr() {
		return createDateStr;
	}

	public void setCreateDateStr(String createDateStr) {
		this.createDateStr = createDateStr;
	}

	public double getPassedUnit() {
		return passedUnit;
	}

	public void setPassedUnit(double passedUnit) {
		this.passedUnit = passedUnit;
	}

	public String getYield() {
		return yield;
	}

	public void setYield(String yield) {
		this.yield = yield;
	}

	public String getYieldLimit() {
		return yieldLimit;
	}

	public void setYieldLimit(String yieldLimit) {
		this.yieldLimit = yieldLimit;
	}

	public int getDataUser() {
		return dataUser;
	}

	public void setDataUser(int dataUser) {
		this.dataUser = dataUser;
	}

	public String getRulesExceptionHtml() {
		return rulesExceptionHtml;
	}

	public void setRulesExceptionHtml(String rulesExceptionHtml) {
		this.rulesExceptionHtml = rulesExceptionHtml;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("DiscreteData [dataKey=");
		builder.append(dataKey);
		builder.append(", historyBtDateKey=");
		builder.append(historyBtDateKey);
		builder.append(", monitorId=");
		builder.append(monitorId);
		builder.append(", inspected=");
		builder.append(inspected);
		builder.append(", defective=");
		builder.append(defective);
		builder.append(", defects=");
		builder.append(defects);
		builder.append(", dpmo=");
		builder.append(dpmo);
		builder.append(", defectOpportunity=");
		builder.append(defectOpportunity);
		builder.append(", passedUnit=");
		builder.append(passedUnit);
		builder.append(", aDataTime=");
		builder.append(aDataTime);
		builder.append(", lastGroupDate=");
		builder.append(lastGroupDate);
		builder.append(", chartType=");
		builder.append(chartType);
		builder.append(", sendEmailDate=");
		builder.append(sendEmailDate);
		builder.append(", ocap=");
		builder.append(ocap);
		builder.append(", groupStatus=");
		builder.append(groupStatus);
		builder.append(", monitorName=");
		builder.append(monitorName);
		builder.append(", location=");
		builder.append(location);
		builder.append(", period=");
		builder.append(period);
		builder.append(", ucl=");
		builder.append(ucl);
		builder.append(", lcl=");
		builder.append(lcl);
		builder.append(", sendEmailTimes=");
		builder.append(sendEmailTimes);
		builder.append(", createDate=");
		builder.append(createDate);
		builder.append(", createDateStr=");
		builder.append(createDateStr);
		builder.append(", aDataTimeStr=");
		builder.append(aDataTimeStr);
		builder.append(", dataStatus=");
		builder.append(dataStatus);
		builder.append(", inputUser=");
		builder.append(inputUser);
		builder.append(", isException=");
		builder.append(isException);
		builder.append(", yield=");
		builder.append(yield);
		builder.append(", yieldLimit=");
		builder.append(yieldLimit);
		builder.append(", dataUser=");
		builder.append(dataUser);
		builder.append(", rulesExceptionHtml=");
		builder.append(rulesExceptionHtml);
		builder.append(", seq=");
		builder.append(seq);
		builder.append(", yAxesValue=");
		builder.append(yAxesValue);
		builder.append(", hideRow=");
		builder.append(hideRow);
		builder.append(", extucl=");
		builder.append(extucl);
		builder.append(", extlcl=");
		builder.append(extlcl);
		builder.append(", createTime=");
		builder.append(createTime);
		builder.append(", createTimeStr=");
		builder.append(createTimeStr);
		builder.append("]");
		return builder.toString();
	}
	
}